package com.cloud.class05.controller;

import com.cloud.class05.apis.PayFeignApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class OrderMicrometerController {
    @Autowired
    private PayFeignApi payFeignApi;

    @GetMapping(value = "/feign/micrometer/{id}")
    public String myMicrometerController(@PathVariable("id") Integer id) {
        log.info("myMicrometer start");
        String result = payFeignApi.myMicrometer(id);
        log.info("myMicrometer end");
        return result;
    }
}
